<template>
    <overallview :element="props.element">
        <el-form-item 
            :label-width="props.element.options.labelHide ? '0px' : props.element.options.labelWidth.value ?  props.element.options.labelWidth.value + props.element.options.labelWidth.unit :  ''"
        >
            <template #label>
                <span class="fc-form-title">
                    <el-tooltip v-if="props.element.options.prompt"  :content="props.element.options.prompt">      
                        <my-icon  name="el-icon-Warning" size="14" style="top: 2px;"/>
                    </el-tooltip>
                    {{ props.element.options.label }}
                </span>
            </template>
            <el-input 
                v-model="props.element.options.value"
                type="password"
                :ref="props.element.options.ref ? props.element.options.ref : undefined"
                :id="props.element.options.id ? props.element.options.id : undefined"
                :name="props.element.options.name ? props.element.options.name : undefined"
                :class="props.element.options.class ? props.element.options.class : undefined"               
                :placeholder="props.element.options.placeholder ? props.element.options.placeholder : undefined"
                :disabled="props.element.options.disabled"
                :readonly="props.element.options.readonly"

                :clearable="props.element.options.clearable"
                :minlength="props.element.options.minlength ? props.element.options.minlength : undefined"
                :maxlength="props.element.options.maxlength ? props.element.options.maxlength : undefined"
            />
        </el-form-item>
    </overallview>
</template>

<script setup>
import overallview from '../overallview.vue'
// 接收父节传入点参数
const props = defineProps({
    element: { // 元素信息
        type: Object,
        default: () => ({}),
    }
})
</script>